package com.ruoyi.project.modules.interfaceinfo.service;

import java.util.List;
import com.ruoyi.project.modules.interfaceinfo.domain.InterfaceInfo;
import com.ruoyi.project.modules.interfaceinfo.request.BffImgReq;
import com.ruoyi.project.modules.interfaceinfo.request.DubboInterfaceAddReq;
import com.ruoyi.project.modules.interfaceinfo.request.DubboParamReq;
import com.ruoyi.project.modules.interfaceinfo.request.ListInterfaceFieldParamReq;
import com.ruoyi.project.modules.interfaceinfo.vo.InterfaceParam;
import com.ruoyi.project.modules.table.domain.FieldInfo;
import com.ruoyi.project.modules.table.domain.TableInfo;
import com.ruoyi.project.modules.usage.domain.Usage;

/**
 * 实体用况Service接口
 * 
 * @author smallrain
 * @date 2021-10-29
 */
public interface IInterfaceInfoService 
{
    /**
     * 查询实体用况
     * 
     * @param id 实体用况主键
     * @return 实体用况
     */
    public InterfaceInfo selectInterfaceInfoById(Long id);

    /**
     * 查询实体用况列表
     * 
     * @param interfaceInfo 实体用况
     * @return 实体用况集合
     */
    public List<InterfaceInfo> selectInterfaceInfoList(InterfaceInfo interfaceInfo);

    List<InterfaceInfo> selectInterfaceInfoByIds(List<Long> ids);

    /**
     * 新增实体用况
     * 
     * @param interfaceInfo 实体用况
     * @return 结果
     */
    public int insertInterfaceInfo(InterfaceInfo interfaceInfo);

    /**
     * 修改实体用况
     * 
     * @param interfaceInfo 实体用况
     * @return 结果
     */
    public int updateInterfaceInfo(InterfaceInfo interfaceInfo);

    /**
     * 批量删除实体用况
     * 
     * @param ids 需要删除的实体用况主键集合
     * @return 结果
     */
    public int deleteInterfaceInfoByIds(String ids);

    /**
     * 删除实体用况信息
     * 
     * @param id 实体用况主键
     * @return 结果
     */
    public int deleteInterfaceInfoById(Long id);

    List<InterfaceInfo> selectSubInterfaces(Long interfaceId);

    List<Usage> selectUsageList(List<Long> ids);

    /**
     * 编辑dubbo接口
     * @param dubboInterfaceAddReq
     * @return
     */
    boolean editDubboInterface(DubboInterfaceAddReq dubboInterfaceAddReq);

    List<InterfaceParam> paramList(String interfaceType, Long interfaceId, String type);

    List<FieldInfo> fieldList(String interfaceType, Long interfaceId, String type);

    List<TableInfo> tableList(String interfaceType, Long interfaceId);

    void saveDubboParam(DubboParamReq dubboParamReq);

    void saveMethodParam(DubboParamReq dubboParamReq);

    void updateSort(DubboInterfaceAddReq dubboInterfaceAddReq);

    List<InterfaceInfo> dubboList(InterfaceInfo interfaceInfo);

    List<InterfaceParam> listInterfaceFieldParam(ListInterfaceFieldParamReq listInterfaceFieldParamReq);
    List<InterfaceParam> listInterfaceParams(ListInterfaceFieldParamReq listInterfaceFieldParamReq);

    List<InterfaceParam> listInterfaceParamsField(ListInterfaceFieldParamReq listInterfaceFieldParamReq);

    void addBffImg(BffImgReq bffImgReq);

    List<InterfaceInfo> usedInterfaceList(Long id);

    List<InterfaceParam> virtualUsageInParamList(String interfaceType, Long interfaceId, Long processBranchId, Long virtualUsageGroupId);

    List<InterfaceParam> paramRequiredList(String type, Long interfaceInfoId, String isInParam);

//    List<FieldInfo> fileListByInterfaceIds(String interfaceType, Long interfaceId, String type);
}
